Method, intelligent device, and system for controlling terminal device

ABSTRACT

A method, device, and system for controlling a terminal device are disclosed. The method includes: traversing, by the intelligent device, pre-stored correspondences between control triggering requests and terminal devices in response to a control triggering request, to search multiple terminal devices for a target device corresponding to the control triggering request; determining whether a control protocol of the intelligent device is consistent with a control protocol of the target device when the intelligent device and the target device are in a connected state; when the control protocol of the intelligent device is consistent with the control protocol of the target device, receiving an input instruction and performing operation control on the target device according to the input instruction. By means of this application, effective intelligent control by an intelligent device on a terminal device such as a computer is implemented, and a requirement of a user is satisfied.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of PCT Patent ApplicationNo. PCT/CN2016/084482, filed on Jun. 2, 2016, which claims priority toChinese Patent Application No. 201510417510.3, filed with the ChinesePatent Office on Jul. 15, 2015, both of which are incorporated herein byreference in their entireties.

FIELD OF THE TECHNOLOGY

This application relates to the field of computer network technologies,and in particular, to a method, an intelligent device, and a system forcontrolling a terminal device.

BACKGROUND OF THE DISCLOSURE

With unceasing scientific and technological progress and continuousimprovement of people's living standard, various household appliances(for example, a refrigerator, an air conditioner, a television, and apersonal computer) are already intelligent and enter numeroushouseholds. It is known that a user usually needs to control thesehousehold appliances by using a dedicated remote controller or bydirectly using operation keys provided on these household appliances.

SUMMARY

Embodiments of this application provide a method, an intelligent device,and a system for controlling a terminal device, to implement effectivecontrol on a terminal device by using an intelligent device.

To achieve the foregoing objective, an embodiment of this applicationprovides a method for controlling a terminal device by using anintelligent device, applied to a device that is for controlling aterminal device and that is located in a first area, and including:

in response to a control triggering request, traversing, by anintelligent device comprising a memory and a processor in communicationwith the memory, pre-stored correspondences between control triggeringrequests and terminal devices, to search multiple terminal devices for atarget device corresponding to the control triggering request;

determining, by the intelligent device, whether a control protocol ofthe intelligent device is consistent with a control protocol of thetarget device when the intelligent device and the target device are in aconnected state; and

when it is determined that the control protocol of the intelligentdevice is consistent with the control protocol of the target device,receiving, by the intelligent device, an input instruction andperforming, by the intelligent device, operation control on the targetdevice according to the input instruction.

An embodiment of this application further provides an intelligent devicefor controlling a terminal device, including:

a memory storing instructions;

a processor in communication with the memory, wherein, when theprocessor executes the instructions, the processor is configured tocause the intelligent device to:

-   -   traverse, in response to a control triggering request,        pre-stored correspondences between control triggering requests        and terminal devices, to search multiple terminal devices for a        target device corresponding to the control triggering request;    -   determine whether a control protocol of the intelligent device        is consistent with a control protocol of the target device when        the intelligent device and the target device are in a connected        state; and    -   when it is determined that the control protocol of the        intelligent device is consistent with the control protocol of        the target device, receive an input instruction, and perform        operation control on the target device according to the input        instruction.

An embodiment of this application further provides a system forcontrolling a terminal device by using an intelligent device, including:

multiple terminal devices; and

an intelligent device, comprising:

-   -   a memory storing instructions;    -   a processor in communication with the memory, wherein, when the        processor executes the instructions, the processor is configured        to cause the intelligent device to:        -   traverse, in response to a control triggering request,            pre-stored correspondences between control triggering            requests and terminal devices, to search multiple terminal            devices for a target device corresponding to the control            triggering request;        -   determine whether a control protocol of the intelligent            device is consistent with a control protocol of the target            device when the intelligent device and the target device are            in a connected state; and        -   when it is determined that the control protocol of the            intelligent device is consistent with the control protocol            of the target device, receive an input instruction, and            perform operation control on the target device according to            the input instruction; and

wherein the target device is configured to:

-   -   create a communications module,    -   establish a connection to the intelligent device by using the        communications module,    -   receive the input instruction sent by the intelligent device,        and    -   perform the operation control according to the input        instruction.

The embodiments of this application provide a method, an intelligentdevice, and a system for controlling a terminal device. The intelligentdevice traverses pre-stored correspondences between control triggeringrequests and terminal devices in response to a control triggeringrequest, to search multiple terminal devices for a target devicecorresponding to the control triggering request. The intelligent devicedetermines whether a control protocol of the intelligent device isconsistent with a control protocol of the target device when theintelligent device and the target device are in a connected state. Theintelligent device receives an input instruction when the controlprotocol of the intelligent device is consistent with the controlprotocol of the target device. The intelligent device performs operationcontrol on the target device according to the input instruction. In thisway, effective control on a terminal device is implemented, and arequirement of a user on flexible intelligent control on the terminaldevice is satisfied.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of a system architecture involved in asolution in an embodiment of this application;

FIG. 2 is a schematic diagram of a hardware structure of an intelligentdevice involved in a solution in an embodiment of this application;

FIG. 3 is a schematic diagram of a wireless communications system forthe intelligent device shown in FIG. 2;

FIG. 4 is a flowchart of an embodiment of a method for controlling aterminal device by using an intelligent device according to thisapplication;

FIG. 5 is a schematic diagram of an operation control panel displayed onan intelligent device in an embodiment of this application;

FIG. 6 is a flowchart of performing operation control on a selectedtarget device according to an input instruction of a user in anembodiment of this application;

FIG. 7 is a flowchart of decoding encoded data by a communicationsmodule of a target device, to obtain an input instruction of a user, sothat corresponding operation control is performed on the target devicein an embodiment of this application;

FIG. 8 is a flowchart of an example in which a computer is controlled byusing a mobile phone in an embodiment of this application;

FIG. 9 is a flowchart of an embodiment of a method for controlling aterminal device by using an intelligent device according to thisapplication;

FIG. 10 is a schematic diagram of functional modules of an embodiment ofan intelligent device controlling a terminal device according to thisapplication;

FIG. 11 is a schematic diagram of a functional structure of an operationcontrol module in an embodiment of this application;

FIG. 12 is a schematic diagram of functional modules of an embodiment ofan intelligent device controlling a terminal device according to thisapplication; and

FIG. 13 is a schematic structural diagram of an intelligent deviceaccording to this application.

DESCRIPTION OF EMBODIMENTS

It should be understood that, the specific embodiments described hereinare merely intended to explain this application, rather than to limitthis application.

In the embodiments of the present application, an intelligent deviceestablishes wireless connections to communications modules of terminaldevices in a same wireless local area network, selects a target devicein the wireless local area network, performs type matching on theselected target device, and presents a corresponding operation controlinterface according to a matching result; receives an input instructionof a user on the corresponding operation control interface; and performsoperation control on the selected target device according to the inputinstruction of the user. In this way, an input operation of a user on anintelligent device is converted into an input operation on a terminaldevice, thereby implementing effective intelligent control on theterminal device by using the intelligent device.

In the embodiments of this application, it is considered that a terminaldevice (a computer is used as an example) such as a computer cannot beeffectively controlled by using a current mobile phone. For example, themobile phone generally needs to be connected to the computer by using adata cable. However, when there is a relatively long distance betweenthe mobile phone of a user and the computer, the requirement of the userfor controlling an operation of the computer by using the mobile phonecannot be satisfied.

In view of this, the embodiments of this application provide a solution,which can implement effective control on a terminal device by using anintelligent device, and satisfy a requirement of a user.

A system architecture involved in a solution of an embodiment may beshown in FIG. 1. The system architecture includes an intelligent deviceand a terminal device. The intelligent device may be specifically as amobile phone, a tablet computer, or a portable device. The terminaldevice may be an intelligent device such as a computer, an airconditioner, or a refrigerator. A computer is used as an example in thisembodiment. In this embodiment of the present application, theintelligent device may be located in a first area, and the terminaldevice may be located in a second area.

The intelligent device is configured to select a to-be-controlled targetdevice from multiple target devices.

In an embodiment of the present application, the intelligent device mayperform type matching on the selected target device, and presents acorresponding operation control interface according to a matchingresult; receives an input instruction on the corresponding operationcontrol interface; and performs operation control on the selected targetdevice according to the input instruction. In this embodiment of thepresent application, the input instruction may be an input instructionof a user or an input instruction that is sensed by the intelligentdevice by using a sensor, for example, a gravity sensor.

In an embodiment of the present application, the intelligent device maycommunicate with the terminal device by using a cable and/or a wirelessnetwork.

The wireless network may include: a wireless personal area network(WPAN), a wireless local area network (WLAN), a wireless wide areanetwork (WWAN), a general packet radio service (GPRS) network, awideband code division multiple access, (WCDMA) network, or the like.

The WPAN may include: a Bluetooth network, a ZigBee network, aultra-wideband (UWB) network, an infrared (IrDA) network, or a homeradio frequency (HomeRF) network.

The wireless local area network may be a wireless network such as aWireless Fidelity (WiFi) network or a Near Field Communication (NFC)network. A WiFi network is used as an example in this embodiment.

WiFi is a technology that can wirelessly connect terminals such as apersonal computer and a handheld device (for example, a PDA or a mobilephone) with each other. WiFi is a brand of a wireless networkcommunications technology, is owned by the WiFi Alliance, and aims toimprove interconnectivity among wireless network products that are basedon the IEEE 802.11 standard.

In this embodiment, the intelligent device searches for a communicationsmodule or a communications server in a same WiFi network. If thesearching succeeds, the intelligent device connects to thecommunications module through WiFi Direct. The communications module isborne on a terminal device such as a computer, an air conditioner, or arefrigerator.

WiFi Direct, which was referred as Wi-Fi Peer-to-Peer, is a set ofsoftware protocols that allow a WiFi device to be directly connected toanother WiFi device in a peer-to-peer manner for high-speed datatransmission rather than via a wireless network base station (accesspoint).

The terminal device is configured to: create a communications module,establish a wireless connection in a wireless local area network to theintelligent device, receive an input instruction of a user that is sentby the intelligent device, and perform operation control on the terminaldevice according to the input instruction of the user.

The communications module is a functional module on the terminal devicethat can wirelessly communicate with the intelligent device, and isconfigured to provide a communications service for a user on the networkthat needs to transfer a file or access information in a remote systemor on a remote network by using a remote communications link. In anotherembodiment, the communications module may also a software server or asoftware communications device than can wirelessly communicate with theintelligent device and is configured to provide a communications servicefor a user on the network that needs to transfer a file or accessinformation in a remote system or on a remote network by using a remotecommunications link. The communications module is used as an example inthis embodiment.

Further, the terminal device is further configured to: search a presetaction encoding mapping table after receiving encoded data by using thecommunications module, to obtain an input instruction corresponding tothe encoded data, where the input instruction includes an inputoperation of the user and additional information of the operation; andconvert the input operation of the user into an input operation on theterminal device, call a corresponding system API function in combinationwith the additional information of the operation, to perform operationcontrol on the terminal device.

It can be known from the system architecture that, in the solution ofthis embodiment, an intelligent device selects a target device in awireless local area network; performs type matching on the selectedtarget device, and presents a corresponding operation control interfaceaccording to a matching result; receives an input instruction of a useron the corresponding operation control interface; and performs operationcontrol on the selected target device according to the input instructionof the user. In this way, effective control on a terminal device isimplemented by using an intelligent device, and a requirement of a userfor flexible intelligent control on the terminal device is satisfied.

An intelligent device that implements embodiments of this application isdescribed below with reference to the accompanying drawings. In thesubsequent description, suffixes such as “module”, “component”, or“unit” that are used to represent elements are only used for ease indescription of this application, and the suffixes have no specificmeaning. Therefore, “module” and “component” may be mixed.

The intelligent device may be implemented in various forms. For example,the terminal described in this application may include an intelligentdevice such as a mobile phone, a smart phone, a laptop computer, adigital broadcast receiver, a personal digital assistant (PDA), a tabletcomputer (PAD), a portable multimedia player (PMP), a wearable device(for example, a smart band or a smart watch), or a navigation device.

As shown in FIG. 2, FIG. 2 is a schematic diagram of a hardwarestructure of an intelligent device according to embodiments of thisapplication.

The intelligent device 100 includes a wireless communications unit 110,an audio/video (A/V) input unit 120, a user input unit 130, a sensingunit 140, an output unit 150, a memory 160, an interface unit 170, acontroller 180, a power supply unit 190, and the like.

FIG. 2 shows the intelligent device having the various components.However, it should be understood that not all the shown components needto be implemented. More or fewer components may be alternativelyimplemented. The elements of the intelligent device are described indetail below.

The wireless communications unit 110 generally includes one or morecomponents, and allows radio communications between the intelligentdevice 100 and a wireless communications system or a network. Forexample, the wireless communications unit may include at least one of abroadcast receiving module 111, a mobile communications module 112, awireless Internet module 113, a short-range communications module 114,or a position information module 115.

The broadcast receiving module 111 receives a broadcast signal from anexternal broadcast management server and/or broadcasts relatedinformation by using a broadcast channel. The broadcast channel mayinclude a satellite channel and/or a ground channel. The broadcastmanagement server may be a server that generates and sends a broadcastsignal and/or broadcasts related information, or a server that receivesa previously generated broadcast signal and/or broadcasts relatedinformation and sends the related information to a terminal. Thebroadcast signal may include a TV broadcast signal, a radio broadcastsignal, a data broadcast signal, or the like. In addition, the broadcastsignal may further include a broadcast signal combined with a TVbroadcast signal or a radio broadcast signal. The broadcast of therelated information may also be provided by using a mobilecommunications network, and in this case, the broadcast relatedinformation may be received by the mobile communications module 112. Thebroadcast signal may exist in various forms. For example, the broadcastsignal may exist in a form such as an electronic program guide (EPG) ofDigital Multimedia Broadcasting (DMB) or an electronic service guide(ESG) of Digital Video Broadcasting-Handheld (DVB-H). The broadcastreceiving module 111 may receive a signal broadcast by using varioustypes of broadcast systems. Particularly, the broadcast receiving module111 may receive a digital broadcast by using a data broadcast systemfor, for example, Digital Multimedia Broadcasting-Terrestrial (DMB-T),Digital Multimedia Broadcasting-Satellite (DMB-S), Digital VideoBroadcasting-Handheld (DVB-H), or Forward Link Only (MediaFLO®), or byusing a digital broadcast system for, for example, Integrated ServicesDigital Broadcasting-Terrestrial (ISDB-T). The broadcast receivingmodule 111 may be configured to be suitable for various broadcastsystems providing broadcast signals and the foregoing digital broadcastsystems. A broadcast signal and/or broadcast related informationreceived by using the broadcast receiving module 111 may be store in thememory 160 (or a storage medium of another type).

The mobile communications module 112 sends a radio signal to or receivesa radio signal from any one of a base station (for example, an accesspoint or a node B), an external terminal, or a server. Such a radiosignal may include a voice communications signal, a video communicationssignal, or various types of data sent and/or received according to atext message and/or a multimedia message.

The wireless Internet module 113 supports wireless Internet access ofthe intelligent device. The module may be internally or externallycoupled to the terminal. A wireless Internet access technology involvedin the module may include a wireless local area network (WLAN), WirelessFidelity (WiFi), wireless broadband (Wibro), Worldwide Interoperabilityfor Microwave Access (WiMAX), or High Speed Downlink Packet Access(HSDPA).

The short-range communications module 114 is a module configured tosupport short-range communication. Some examples of short-rangecommunications technologies include Bluetooth™, radio frequencyidentification (RFID), Infrared Data Association (IrDA), ultra-wideband(UWB), and ZigBee™.

The position information module 115 is a module configured to check orobtain position information of the intelligent device. A typical exampleof the position information module is the Global Positioning System(GPS). According to existing technologies, a GPS module calculatesdistance information and accurate time information from three or moresatellites, and applies a triangulation method to the calculatedinformation, so as to accurately calculate current position informationaccording to a longitude, a latitude, and a height. Currently, in amethod for calculating the position information and the timeinformation, three satellites are used and another satellite is used torectify errors in the calculated position information and timeinformation. In addition, the GPS module can calculate speed informationby continuously calculating the current position information in realtime.

The A/V input unit 120 is configured to receive an audio signal or avideo signal. The A/V input unit 120 may include a camera 121 and amicrophone 122. The camera 121 processes image data of a static pictureor a video that is obtained by an image acquisition apparatus in a videoacquisition mode or an image acquisition mode. An image frame that hasbeen processed may be displayed on a display unit 151. The image framethat has been processed by the camera 121 may be stored in the memory160 (or another storage medium) or sent by using the wirelesscommunications unit 110. Two or more cameras 121 may be providedaccording to a structure of the intelligent device. The microphone 122may receive a sound (audio data) in an operation mode such as atelephone call mode, a record mode, or a voice recognition mode by usingthe microphone, and can process the sound into audio data. The audio(voice) data that has been processed may be converted, in the telephonecall mode, into a format that can be sent to a mobile communicationsbase station by using the mobile communications module 112 and beoutput. The microphone 122 may implement various types of noisecancelling (or suppression) algorithms to cancel (or suppress) noise orinterference that is generated in a process of receiving and sending anaudio signal.

The user input unit 130 may generate key input data according to acommand input by a user, to control various operations of theintelligent device. The user input unit 130 allows the user to inputvarious types of information, and may include a keyboard, a metal dome,a touch panel (for example, a touch-sensitive component that detects achange in resistance, press, capacitance, or the like resulted from atouch), a wheel, a joystick, and the like. Particularly, when touchpanels are superposed on the display unit 151 in the form of layers, atouchscreen may be formed.

The sensing unit 140 detects a current state of the intelligent device100 (for example, an open or closed state of the intelligent device100), a position of the intelligent device 100, whether there is a touch(that is, a touch input) of the user on the intelligent device 100, anorientation of the intelligent device 100, an acceleration ordeceleration movement and direction of the intelligent device 100, orthe like, and generates a command or a signal used to control anoperation of the intelligent device 100. For example, when theintelligent device 100 is implemented as a slide-type mobile phone, thesensing unit 140 may sense whether the slide-type phone is being openedor closed. In addition, the sensing unit 140 can detect whether thepower supply unit 190 provides power or whether the interface unit 170is coupled to an external apparatus. The sensing unit 140 may include aproximity sensor 141, which is described below in combination with atouchscreen.

The interface unit 170 is used as an interface through which at leastone external apparatus and the intelligent device 100 may be connected.For example, the external apparatus may include a wired or wirelessheadset port, an external power supply (or a battery charger) port, awired or wireless data port, a storage card port, a port used to connectan apparatus having an identification module, an audio input/output(I/O) port, a video I/O port, an earphone port, and the like. Theidentification module may store various information used to authenticatethe user when the user uses the intelligent device 100, and may includea user identification module (UIM), a subscriber identification module(SIM), a universal subscriber identification module (USIM), or the like.In addition, an apparatus having the identification module (referred toas an “identification apparatus” below) may be in the form of a smartcard. Therefore, the identification apparatus may be connected to theintelligent device 100 by using a port or another connection apparatus.The interface unit 170 may be configured to receive an input (forexample, data information or power) from an external apparatus, andtransmit the received input to one or more elements in the intelligentdevice 100, or may be configured to transmit data between theintelligent device and the external apparatus.

In addition, when the intelligent device 100 is connected to an externalbase, the interface unit 170 may be used as a path that allows power tobe supplied to the intelligent device 100 from the base through thepath, or may be used as a path that allows various command signals thatare input from the base to be transmitted to the intelligent device. Thevarious command signals or power that is input from the base may be usedas a signal for detecting whether the intelligent device is correctlyinstalled on the base. The output unit 150 is configured to provide anoutput signal (for example, an audio signal, a video signal, an alertsignal, or a vibration signal) in a visual, audio, and/or tactilemanner. The output unit 150 may include a display unit 151, an audiooutput module 152, an alert unit 153, and the like.

The display unit 151 may display information processed on theintelligent device 100. For example, when the intelligent device 100 isin the telephone call mode, the display unit 151 may display a userinterface (UI) or a graphical user interface (GUI) related to a call orother communications (for example, text message receiving and sendingand multimedia file downloading). When the intelligent device 100 is inthe video call mode or the image acquisition mode, the display unit 151may display an acquired image and/or a received image, show a UI or GUIrelated to a video or an image and related functions, and the like.

In addition, when the display unit 151 and the touch panel aresuperposed on each other in the form of layers to form a touchscreen,the display unit 151 may be used as an input apparatus and an outputapparatus. The display unit 151 may include at least one of a liquidcrystal display (LCD), a thin film transistor liquid crystal display(TFT-LCD), an organic light emitting diode (OLED) display, a flexibledisplay, or a three-dimensional (3D) display. Some of these displays maybe constructed as transparent to allow a user to view the displays fromthe outside, which can be referred to as transparent displays. A typicaltransparent display may be, for example, a transparent organic lightemitting diode (TOLED) display. According to a specific desiredimplementation, the intelligent device 100 may include two or moredisplay units (or another display apparatus). For example, theintelligent device may include an external display unit (not shown) andan internal display unit (not shown). The touchscreen may be configuredto detect a touch input press and a touch input position and a touchinput area.

The audio output module 152 may convert, when the intelligent device isin a call signal receiving mode, the call mode, the record mode, thevoice recognition mode, a broadcast receiving mode, or the like, theaudio data that is received by the wireless communications unit 110 orstored in the memory 160 into audio signals and output the audio signalsas a sound. In addition, the audio output module 152 may provide anaudio output that is related to a particular function executed by theintelligent device 100 (for example, a call signal receiving sound or amessage receiving sound). The audio output module 152 may include aloudspeaker, a buzzer, or the like.

The alert unit 153 may provide an output to notify the intelligentdevice 100 of occurrence of an event. A typical event may include callreceiving, message receiving, a key signal input, a touch input, or thelike. In addition to an audio output or a video output, the alert unit153 may provide an output in different forms to notify occurrence of anevent. For example, the alert unit 153 may provide an output in the formof a vibration. When receiving a call, a message, or some other incomingcommunications, the alert unit 153 may provide a tactile output (thatis, a vibration) to notify the user of the event. By providing such atactile output, even when a mobile phone of a user is in a pocket of theuser, the user can still identify occurrences of various events. Thealert unit 153 may also provide, by using the display unit 151 or theaudio output module 152, an output notifying occurrence of an event.

The memory 160 may store a software program that is executed by acontroller 180 to process and control operations, or the like, or maytemporarily store data (for example, a telephone book, a message, astatic image, or a video) that has been output or to be output. Inaddition, the memory 160 may store data of various forms of vibrationsand audio signals that are output when touches are applied to thetouchscreen.

The memory 160 may include at least one type of storage medium. Thestorage medium includes a flash memory, a hard disk drive, a multimediacard, a card-type memory (for example, an SD memory or a DX memory), arandom access memory (RAM), a static random access memory (SRAM), aread-only memory (ROM), an electrically erasable programmable read onlymemory (EEPROM), a programmable read-only memory (PROM), a magneticmemory, a magnetic disk, an optical disk, or the like. In addition, theintelligent device 100 may cooperate with a network storage apparatusthat executes a storage function of the memory 160 by using a networkconnection.

The controller 180 generally controls an overall operation of theintelligent device. For example, the controller 180 performs control andprocessing related to a voice call, data communication, a video call, orthe like. In addition, the controller 180 may include a multimediamodule 181 configured to reproduce (or replay) multimedia data. Themultimedia module 181 may be constructed inside the controller 180, ormay be constructed as separate from the controller 180. The controller180 may perform pattern recognition processing, to recognize ahandwriting input or a picture drawing input performed on thetouchscreen as a character or an image.

Under the control of the controller 180, the power supply unit 190receives external power or internal power and provides suitable powerfor operating the elements and the components.

The various implementations described herein may be implemented byusing, for example, a computer readable medium including computersoftware, computer hardware, or any combination thereof. For a hardwareimplementation, the implementations described herein may be implementedby using at least one of an application-specific integrated circuit(ASIC), a digital signal processor (DSP), a digital signal processingdevice (DSPD), a programmable logic device (PLD), a field programmablegate array (FPGA), a processor, a controller, a microcontroller, amicroprocessor, an electronic unit designed to perform the functiondescribed herein. In some cases, such an implementation may beimplemented in the controller 180. For a software implementation, animplementation of a process or a function may be implemented by using aseparate software module that allows at least one function or operationto be performed. Software code may be implemented by using a softwareapplication program (or program) written in any appropriate programminglanguage, and the software code may be stored in the memory 160 andexecuted by the controller 180.

By now, the intelligent device has been described according to thefunctions of the intelligent device.

For brevity, a slide-type intelligent device among various types ofintelligent devices such as a folded-type intelligent device, a bar-typeintelligent device, a swing-type intelligent device, and a slide-typeintelligent device is described below as an example. Therefore, thisapplication can be applied to any type of intelligent device, notlimited to the slide-type intelligent device.

The intelligent device 100 shown in FIG. 2 may be configured to operateby using, for example, a wired communications system, a wirelesscommunications system, and a satellite-based communications system inwhich data is sent by using a frame or a packet.

A communications system in which the intelligent device according tothis application can operate is now described with reference to FIG. 3.

Such a communications system may use different air interfaces and/orphysical layers. For example, an air interface used by thecommunications system includes, for example, frequency division multipleaccess (FDMA), time division multiple access (TDMA), code divisionmultiple access (CDMA), universal mobile telecommunications system(UMTS) (particularly, Long Term Evolution (LTE)), or Global System forMobile Communications (GSM). As a non-restrictive example, a CDMAcommunications system is involved in the following description, but theteaching is also applicable to other types of systems.

Referring to FIG. 3, the CDMA wireless communications system may includemultiple intelligent devices 100, multiple base stations (BS) 270, atleast one base station controller (BSC) 275, and a mobile switchingcenter (MSC) 280. The MSC 280 is configured to form an interface with apublic switched telephone network (PSTN) 290. The MSC 280 is furtherconfigured to be coupled to the BSC 275 of the base stations 270 byusing a backhaul line to form an interface. The backhaul line may beconstructed according to any one of several known interfaces, and theinterfaces include, for example, E1/T1, ATM, IP, PPP, frame relay, HDSL,ADSL, or xDSL. It should be understood that, the system shown in FIG. 3may include multiple BSs 270.

Each BS 270 may serve one or more sections (or areas), and each sectioncovered by an omni-directional antenna or an antenna directing to aparticular direction radially departs from the BS 270. Alternatively,each section may be covered by two or more antennas for diversityreceiving. Each BS 270 may be configured to support multiple frequencyallocations, and each frequency allocation has a particular frequencyspectrum (for example, 1.25 MHz or 5 MHz).

A cross between a section and a frequency allocation may be referred toas a CDMA channel. The BSs 270 may also be referred to as basetransceiver stations (BTS) or another equivalent term. In such cases,the term “base station” may be used to collectively represent a singleBSC 275 and at least one BS 270. The base station may also be referredto as a “cellular station”. Alternatively, sections of a particular BS270 may be referred to as multiple cellular stations.

As shown in FIG. 3, a broadcast transmitter (BT) 295 sends a broadcastsignal to the intelligent devices 100 operating in the system. Thebroadcast receiving modules 111 shown in FIG. 2 are set on theintelligent devices 100 to receive the broadcast signal sent by the BT295. In FIG. 3, several Global Positioning System (GPS) satellites 300are shown. The satellites 300 help to position at least one of themultiple intelligent devices 100.

In FIG. 3, multiple satellites 300 are described. However, it should beunderstood that, useful positioning information may be obtained by usingany quantity of satellites. The GPS module shown in FIG. 2 is usuallyconfigured to cooperate with the satellites 300 to obtain desiredpositioning information. As an alternative to a GPS tracking technologyor in addition to the GPS tracking technology, another technology thatcan be used to track a position of an intelligent device may be used. Inaddition, at least one GPS satellite 300 may optionally or additionallyprocess satellite DMB transmission.

As a typical operation of the wireless communications system, the BSs270 receive reverse link signals from the various types of intelligentdevices 100. The intelligent devices 100 usually participate in a call,message receiving and sending, and other types of communication. Eachreverse link signal received by a particular base station 270 isprocessed inside the particular BS 270. Obtained data is forwarded to arelated BSC 275. The BSC provides call resource allocation and amobility management function including coordination of a soft switchingprocess among the BSs 270. The BSC 275 further routes received data tothe MSC 280, and the MSC 280 provides an additional routing service forforming an interface with the PSTN 290. Similarly, the PSTN 290 and theMSC 280 form an interface, the MSC and the BSC 275 form an interface,and the BSC 275 correspondingly controls the BSs 270 to send forwardlink signals to the intelligent devices 100.

Based on the foregoing system architecture, the hardware structure ofthe intelligent device, and the communications system, an embodiment ofa method for controlling a terminal device by using an intelligentdevice according to this application is provided.

As shown in FIG. 4, an embodiment of this application provides a methodfor controlling a terminal device by using an intelligent device,including the following steps:

Step S101. The intelligent device traverses pre-stored correspondencesbetween control triggering requests and terminal devices in response toa control triggering request, to search multiple terminal devices for atarget device corresponding to the control triggering request. Theintelligent device may include a CPU or processor and a memory incommunication with the processor, wherein the memory has stored thereinexecutable instructions for the processor.

The intelligent device may select one terminal device from terminaldevices in a same local area network as the target device according to aneed of a user for controlling a terminal device.

When selecting the target device, the intelligent device may obtain acommunications module of the target device by means of searching, toestablish a communications connection to the target device.

In an embodiment of the present application, the intelligent device maybe used to control multiple terminal devices. Therefore, the intelligentdevice is provided with a trigger interface corresponding to eachcontrolled terminal device. When a particular trigger interface istriggered, the intelligent device generates a control triggeringrequest, for example, an operation code. The intelligent device stores acorrespondence between each controlled terminal device and a controltriggering request, searches for a terminal device corresponding to thecontrol triggering request, considers the terminal device as acontrolled target device, and establishes a connection to acommunications module of the controlled target device.

The communications module provides a communications service for a useron a network that needs to transfer a file or access information in aremote system or on a remote network by using a remote communicationslink.

Each terminal device may create a communications module of its own, toimplement a wireless communications connection to the intelligentdevice.

Using an example in which a mobile phone controls a computer in a WiFinetwork, the mobile phone searches for a communications module of thecomputer in the same WiFi network. If the search succeeds, theintelligent device connects to the communications module by means ofWiFi Direct.

When a wireless connection is established, the following scheme may bespecifically used:

sending a connection request to the communications module of thecomputer by the mobile phone when the mobile phone finds thecommunications module of the computer in the wireless network; and

returning a connection response message to the mobile phone by thecommunications module of the computer according to the connectionrequest, so as to establish a wireless connection between the mobilephone and the communications module of the computer.

Step S102. The intelligent device determines whether a control protocolof the intelligent device is consistent with a control protocol of thetarget device when the intelligent device and the target device are in aconnected state.

In an embodiment of the present application, to control the targetdevice by using the intelligent device, cooperation between the targetdevice and the intelligent device needs to be ensured to implement acorresponding control function. For example, control protocols need tobe respectively set on the intelligent device and the target device. Forexample, the control protocol set on the intelligent device includes anencoding format of an input instruction and a version of the controlprotocol. The control protocol set on the target device includes adecoding format and a version of the control protocol. Before performingcontrol, the intelligent device needs to determine whether the encodingformat in the control protocol of the intelligent device matches thedecoding format on the target device, and whether the versions of thetwo control protocols are compatible, so as to perform a controloperation subsequently.

In an embodiment of the present application, the method furtherincludes: obtaining, by the intelligent device, a type of the targetdevice after selecting the target device.

In this embodiment, corresponding operation control interfaces are setin advance according to different types of terminal devices. Forexample, an operation control interface for a computer may be an actualdisplay interface of the computer. For another example, considering thatan air conditioner has no display interface, a default operation controlinterface may be used.

After the type of the target device is obtained, type matching isperformed on the selected target device according to the type of thetarget device and preset mappings between device types and operationcontrol interfaces, to obtain an operation control interface for thetarget device.

Thereafter, an operation control panel is displayed on the intelligentdevice, for the user to input an operation instruction. The operationcontrol panel displayed on the intelligent device may be shown in FIG.5. On the operation control panel, a touch area may be displayed, and aleft button, a right button, and a wheel of a mouse may be simulated tooperate the computer.

Step S103. The intelligent device receives an input instruction when thecontrol protocol of the intelligent device is consistent with thecontrol protocol of the target device.

Step S104. The intelligent device performs operation control on theselected target device according to the input instruction of the user.

The input instruction of the user is received on the correspondingoperation control interface, and the input instruction of the user issent to the communications module of the terminal device by using thewireless connection, to perform operation control on the terminaldevice.

The intelligent device receives, on the displayed operation controlpanel, the operation instruction input by the user.

The input instruction of the user may include: a touch operation, aclick operation, data obtained by a gravity sensor, data obtained by alight sensor, data obtained by a gyroscope, a sound, an image capturedby a camera, or the like.

The intelligent device sends the input instruction of the user to thecommunications module of the terminal device by using the wirelessconnection, to perform operation control on the terminal device.

On the operation control panel shown in FIG. 5, using a single leftclick as an example, after a single click instruction is transferred tothe computer by using the steps in the foregoing solution, aWM_LBUTTONDOWN message is sent to a currently activated window on thewindows computer, and after processing the message, the window performsa corresponding click operation. For example, when a URL link isclicked, the link is opened.

By means of the solution in this embodiment, an intelligent deviceselects a target device in a wireless local area network; performs typematching on the selected target device, and presents a correspondingoperation control interface according to a matching result; receives aninput instruction of a user on the corresponding operation controlinterface; and performs operation control on the selected target deviceaccording to the input instruction of the user. In this way, effectivecontrol on a terminal device is implemented by using an intelligentdevice, and a requirement of a user for flexible intelligent control onthe terminal device is satisfied.

Further, based on the foregoing embodiment, in an implementation, asshown in FIG. 6, the foregoing step S104: The intelligent deviceperforms operation control on the selected target device according tothe input instruction of the user may include:

Step S1032. The intelligent device encodes the input instruction of theuser, to obtain encoded data.

In an embodiment of the present application, an input apparatus, forexample, an input button, corresponding to each operation of the targetdevice is set on the intelligent device. For example, corresponding toan operation of increasing a volume of a player on the computer, abutton that controls a volume increase is set on the intelligent device.When the button is triggered, the intelligent device collects the inputsignal. The intelligent device encodes the input signal according to thecontrol protocol of the intelligent device, to obtain the encoded data.

Step S1033. The intelligent device sends the encoded data to thecommunications module of the target device, and the communicationsmodule of the target device decodes the encoded data, to obtain theinput instruction of the user, so that corresponding operation controlis performed on the target device.

Correspondingly, the target device searches, in the control protocol ofthe target device that is consistent with the control protocol of theintelligent device, a preset action encoding mapping table storingcorrespondences between input instructions and encoded data, and afterfinding the input instruction, calls an API function, and performs,according to the input instruction, an operation of increasing a volume.

Specifically, after receiving the input instruction of the user, theintelligent device encodes the input instruction of the user. Anencoding process is mapping a specific input action to a code formed byusing a character, a digit, and the like, to uniquely identify theaction, and adding information according to different types ofoperations. A specific encoding format may be shown in the followingTable 1.

TABLE 1 Operation Operation type code Additional operation informationSingle click operation click Coordinates (x, y) of a position on ascreen of the single click on the screen Touch gesture touch Positioncoordinates sequence {(x1, on a screen y1), (x2, y2), . . . , (xn, yn)}

By encoding the input instruction of the user, data transmissionefficiency can be improved.

Thereafter, the intelligent device sends the code of the user input tothe communications module of the target device such as the computer bymeans of WiFi Direct.

Based on the foregoing embodiment, in an implementation, as shown inFIG. 7, the step of decoding the encoded data by the communicationsmodule of the target device, to obtain the input instruction of theuser, so that the corresponding operation control is performed on thetarget device may include:

Step S1034. The communications module of the target device searches thepreset action encoding mapping table after receiving the encoded data,to obtain the input instruction corresponding to the encoded data, wherethe input instruction includes the input operation of the user and theadditional information of the operation.

Step S1035. The target device converts the input operation of the userinto an input operation on the target device, and calls a correspondingsystem API function in combination with the additional information ofthe operation, to perform operation control on the target device.

Specifically, using an example in which the target device is a computer,after receiving the encoded data, a communications module of thecomputer searches an action encoding mapping table at the input, andobtains the user input operation represented by the code and theadditional information of the operation. Then, the computer converts theoperation input by the user by using the intelligent device into aninput operation on the computer, and finally implements correspondingcontrol on the computer by calling a corresponding system applicationprogramming interface (API) function. For example, a file on thecomputer may be opened or the computer may be shut down by using atouchscreen mobile phone and using a finger as a mouse.

In an embodiment of the present application, same input instructions areconverted into same encoded data, to control different target devices toperform a same operation in a same application. For example, theintelligent device encodes a “single click operation on a screen” intoencoded data “click”, and a computer and a television both convert theencoded data “click” into a “single click operation on a screen”, toperform an operation of playing a program in a player.

By means of the foregoing solution in this embodiment, an inputoperation of a user on an intelligent device is converted into an inputoperation on a terminal device, thereby implementing effectiveintelligent control on the terminal device such as a computer by usingthe intelligent device, and satisfying a requirement of a user. In thisembodiment of the present application, a same application program onmultiple terminal devices can be controlled by using one intelligentdevice, and efficiency of control on the terminal devices can thereforebe improved.

The solution in this embodiment of this application is explained indetail below by using an example in which a computer is controlled byusing a mobile phone and by referring to FIG. 8.

As shown in FIG. 8, a process in which a computer is controlled by usinga mobile phone is as follows:

1. The mobile phone searches for a communications module in a same WiFinetwork. If the search succeeds, the mobile phone connects to thecommunications module by means of WiFi Direct.

2. After the mobile phone successfully establishes a connection to thecommunications module, the mobile phone displays a correspondingoperation control panel.

3. The mobile phone receives a user input, where the user input mayinclude: a touch operation, a click operation, data obtained by agravity sensor, data obtained by a light sensor, data obtained by agyroscope, a sound, an image captured by a camera, or the like.

4. The mobile phone encodes the user input (Encoding is mapping aspecific input action to a code formed by using a character, a digit,and the like, to uniquely identify the action, and adding informationaccording to different types of operations), and sends a code of theuser input to the communications module of the computer by means of WiFiDirect.

5. After receiving the encoded data, the computer obtains, by searchingan action encoding mapping table at the input, a user input operationrepresented by the code, and additional information of the operation.

6. The computer coverts the operation input by the user by using themobile phone into an input operation on the computer, and controls thecomputer by calling a corresponding system API function.

A use scenario is described as an example as follows:

A mobile phone generally has best portability, whereas a large computingdevice such as a desktop computer is generally fixed at a particularposition. Sometimes a user is out while the computer is at home, but theuser needs materials on the computer, or the user lies on the bed andplays with a mobile phone, and does not want to get out of bed to shutdown the computer. In this case, the user may use the mobile phone tocontrol to shut down the computer by using the foregoing solution.

Therefore, by virtue of the advantage of simple operation of the mobilephone, and by using a touch operation and simulating an operation of amouse, various operations such as opening a file on the computer andshutting down the computer can be performed, providing convenience tothe user in remotely manipulating the computer by using the mobilephone.

On the operation control panel shown in FIG. 5, using a single leftclick as an example, after a single click instruction is transferred tothe computer by using the steps in the foregoing solution, aWM_LBUTTONDOWN message is sent to a currently activated window on thecomputer, and after processing the message, the computer performs acorresponding operation. For example, when a URL link is clicked, thelink is opened.

As shown in FIG. 9, an embodiment of this application provides a methodfor controlling a terminal device by using an intelligent device. Beforethe foregoing step S910: The intelligent device selects the targetdevice in the wireless local area network, the method in FIG. 9includes:

Step S900. The intelligent device configures the mappings between devicetypes and operation control interfaces.

Specifically, in this embodiment, corresponding operation controlinterfaces are set according to different types of terminal devices, andcorresponding mappings are formed. For example, an operation controlinterface for a computer may be an actual display interface of thecomputer. For another example, considering that an air conditioner hasno display interface, a default operation control interface may be used.

Subsequently, Step S920: after the type of the target device isobtained, type matching is performed on the selected target deviceaccording to the type of the target device and the preset mappingsbetween device types and operation control interfaces, to obtain theoperation control interface of the target device. Step S930: Receive aninput instruction of a user on the corresponding operation controlinterface, and step S940: perform operation control on the selectedtarget device according to the input instruction of the user.

In this embodiment, by configuring the mappings between device types andoperation control interfaces, convenience and flexibility of operationson the terminal device are improved.

Correspondingly, an embodiment of functional modules of an intelligentdevice for controlling a terminal device according to this applicationis provided.

As shown in FIG. 10, a preferable embodiment of this applicationprovides an intelligent device for controlling a terminal device,including a selection module 200, a determining module 201, a receivingmodule 202, and an operation control module 203.

The selection module 200 is configured to traverse pre-storedcorrespondences between control triggering requests and terminal devicesin response to a control triggering request, to search multiple terminaldevices for a target device corresponding to the control triggeringrequest.

The determining module 201 is configured to determine whether a controlprotocol of the intelligent device is consistent with a control protocolof the target device when the intelligent device and the target deviceare in a connected state.

The receiving module 202 is configured to receive an input instructionwhen the control protocol of the intelligent device is consistent withthe control protocol of the target device.

The operation control module 203 is configured to perform operationcontrol on the selected target device according to the inputinstruction.

In an embodiment of the present application, the intelligent devicefurther includes a matching and displaying module 204, configured to:perform type matching on the selected target device, and present acorresponding operation control interface according to a matchingresult.

The receiving module 202 is configured to receive the input instructionon the operation control interface.

Specifically, the intelligent device may select one terminal device fromterminal devices in a same local area network as the target deviceaccording to a need of a user for controlling a terminal device.

When selecting the target device, the intelligent device may obtain acommunications module of the target device by means of searching, toestablish a communication connection to the target device.

The communications module provides a communications service for a useron a network that needs to transfer a file or access information in aremote system or on a remote network by using a remote communicationslink.

Each terminal device may create a communications module of its own, toimplement a wireless communications connection to the intelligentdevice.

Using an example in which a mobile phone controls a computer in a WiFinetwork, the mobile phone searches for a communications module of thecomputer in the same WiFi network. If the search succeeds, theintelligent device connects to the communications module by means ofWiFi Direct.

When a wireless connection is established, the following scheme may bespecifically used:

sending a connection request to the communications module of thecomputer by the mobile phone when the mobile phone finds thecommunications module of the computer in the wireless network; and

returning a connection response message to the mobile phone by thecommunications module of the computer according to the connectionrequest, so as to establish a wireless connection between the mobilephone and the communications module of the computer.

After selecting the target device, the intelligent device obtains a typeof the target device.

In this embodiment, corresponding operation control interfaces are setin advance according to different types of terminal devices. Forexample, an operation control interface for a computer may be an actualdisplay interface of the computer. For another example, considering thatan air conditioner has no display interface, a default operation controlinterface may be used.

After the type of the target device is obtained, type matching isperformed on the selected target device according to the type of thetarget device and preset mappings between device types and operationcontrol interfaces, to obtain an operation control interface for thetarget device.

Thereafter, an operation control panel is displayed on the intelligentdevice, for the user to input an operation instruction. The operationcontrol panel displayed on the intelligent device may be shown in FIG.5. On the operation control panel, a touch area may be displayed, and aleft button, a right button, and a wheel of a mouse may be simulated tooperate the computer.

The input instruction of the user is received on the correspondingoperation control interface, and the input instruction of the user issent to the communications module of the terminal device by using thewireless connection, to perform operation control on the terminaldevice.

The intelligent device receives, on the displayed operation controlpanel, the operation instruction input by the user.

The input instruction of the user may include: a touch operation, aclick operation, data obtained by a gravity sensor, data obtained by alight sensor, data obtained by a gyroscope, a sound, an image capturedby a camera, or the like.

The intelligent device sends the input instruction of the user to thecommunications module of the terminal device by using the wirelessconnection, to perform operation control on the terminal device.

On the operation control panel shown in FIG. 5, using a single leftclick as an example, after a single click instruction is transferred tothe computer by using the steps in the foregoing solution, aWM_LBUTTONDOWN message is sent to a currently activated window on awindows computer, and after processing the message, the window performsa corresponding click operation. For example, when a URL link isclicked, the link is opened.

By means of the solution in this embodiment, the intelligent deviceselects a target device in a wireless local area network; performs typematching on the selected target device, and presents a correspondingoperation control interface according to a matching result; receives aninput instruction of a user on the corresponding operation controlinterface; and performs operation control on the selected target deviceaccording to the input instruction of the user. In this way, effectivecontrol on a terminal device is implemented by using an intelligentdevice, and a requirement of a user for flexible intelligent control onthe terminal device is satisfied.

Further, based on the foregoing embodiment, in an implementation, asshown in FIG. 11, the operation control module 203 further includes anencoding unit 2032 and a sending unit 2033.

The encoding unit 2032 is configured to encode the input instructionaccording to the control protocol of the intelligent device, to obtainencoded data.

The sending unit 2033 is configured to: send the encoded data to acommunications module of the target device, so that the communicationsmodule of the target device decodes the encoded data according to thecontrol protocol of the target device, to obtain the input instruction,so that the operation of the target device is performed.

Specifically, after receiving the input instruction of the user, theintelligent device encodes the input instruction of the user. Anencoding process is mapping a specific input action to a code formed byusing a character, a digit, and the like, to uniquely identify theaction, and adding information according to different types ofoperations. A specific encoding format may be shown in Table 1 above.

By encoding the input instruction of the user, data transmissionefficiency can be improved.

Thereafter, the intelligent device sends the code of the user input tothe communications module of the target device such as the computer bymeans of WiFi Direct.

Specifically, using an example in which the target device is a computer,after receiving the encoded data, a communications module of thecomputer searches an action encoding mapping table at the input, andobtains the user input operation represented by the code and theadditional information of the operation. Then, the computer converts theoperation input by the user by using the intelligent device into aninput operation on the computer, and finally implements correspondingcontrol on the computer by calling a corresponding system applicationprogramming interface (API) function. For example, a file on thecomputer may be opened or the computer may be shut down by using atouchscreen mobile phone and using a finger as a mouse.

By means of the foregoing solution in this embodiment, an inputoperation of a user on an intelligent device is converted into an inputoperation on a terminal device, thereby implementing effectiveintelligent control on the terminal device such as a computer by usingthe intelligent device, and satisfying a requirement of a user.

As shown in FIG. 12, an embodiment of this application provides anintelligent device for controlling a terminal device. Based on theembodiment shown in the foregoing FIG. 10, the intelligent devicefurther includes:

a configuration module 90, configured to configure the mappings betweendevice types and operation control interfaces.

Specifically, in this embodiment, corresponding operation controlinterfaces are set according to different types of terminal devices, andcorresponding mappings are formed. For example, an operation controlinterface for a computer may be an actual display interface of thecomputer. For another example, considering that an air conditioner hasno display interface, a default operation control interface may be used.

Subsequently, after the type of the target device is obtained, typematching is performed on the selected target device according to thetype of the target device and the preset mappings between device typesand operation control interfaces, to obtain the operation controlinterface of the target device.

In this embodiment, by configuring the mappings between device types andoperation control interfaces, convenience and flexibility of operationson the terminal device are improved.

FIG. 13 is a schematic structural diagram of an intelligent deviceaccording to this application.

The device includes a processor 1301, a non-volatile (or non-transitory)computer readable memory 1302, a display unit 1303, a networkcommunications interface 1304. These components communicate by using abus 1305.

In this embodiment, multiple program modules are stored in the memory1302, including an operating system 1306, a network communicationsmodule 1307, and an application program 1308.

The processor 1301 may read various modules (not shown in the figure)included in the application program in the memory 1302, to performvarious functional applications and data processing of the device forcontrolling a terminal device. There may be one processor 1301 ormultiple processors 1301 in this embodiment, and the processor 1301 maybe a CPU, a processing unit/module, an ASIC, a logic module, aprogrammable gate array, or the like.

The operating system 1306 may be a Windows operating system, an Androidoperating system, or an Apple iPhone operating system.

The application program 1308 may include a module 1309 for controlling aterminal device. The module 1309 for controlling a terminal device mayinclude a computer executable instruction set 1309-1 formed by thefunctional modules in the devices shown in FIG. 10 and FIG. 12, andcorresponding metadata and a heuristic algorithm 1309-2. The computerexecutable instruction set may be executed by the processor 1301 toperform the methods shown in FIG. 4 and FIG. 9 or the functions of thedevices shown in FIG. 10 and FIG. 12.

In this embodiment, the network communications interface 1304 cooperateswith the network communications module 1307 to complete receiving andsending of various network signals of the device for controlling aterminal device.

The display unit 1303 has a display panel, configured to complete inputand display of related information.

If the device for controlling a terminal device has no communicationsrequirement, the device for controlling a terminal device may also notinclude the network communications interface 1304 and the networkcommunications module 1307.

In addition, for a system for controlling a terminal device provided inan embodiment of this application, refer to the system architectureshown in FIG. 1. For a basic principle of controlling a terminal deviceby using an intelligent device thereof, refer to the foregoingembodiments, and details are not described herein again.

It should be further noted that, in this specification, the term“include”, “contain”, or any other variant is intended to encompassnon-exclusive include, so that a process, a method, an article, or adevice including a series of elements not only includes those elements,but also includes other elements not explicitly listed, or furtherincludes elements inherent in the process, the method, the article, orthe device. Without other limitations, for an element defined by thestatement “includes a . . . ”, it is not excluded that there are othersame elements in a process, a method, an article, or a device includingthe element.

The serial numbers of the foregoing embodiments of this applicationserve for a description purpose only, and do not indicate the preferenceof the embodiments.

Through the foregoing description on the implementations, a personskilled in the art can clearly learn that the foregoing embodimentmethods may be implemented by using software in combination with anecessary universal hardware platform. Certainly, the embodiment methodsmay also be implemented by using hardware, but the former is a betterimplementation in many cases. Based on such an understanding, essentialsor parts contributing to the prior art of the technical solutions ofthis application may be embodied in the form of a software product. Thecomputer software product is stored in a storage medium (for example, aROM/RAM, a magnetic disk, or an optical disk), and includes severalinstructions to cause a terminal device (which may be a mobile phone, acomputer, a server, or a network device) to execute the method describedin the embodiments of this application.

What is described above is merely preferable embodiments of thisapplication, and does not thereby limit the patentable scope of thisapplication. Equivalent structures or process variations made by usingthe content in the specification or the accompanying drawings in thisapplication, whether directly or indirectly applied to other relatedtechnical fields, are similarly covered by the patent protection scopeof this application.

What is claimed is:
 1. A method for controlling a terminal device,comprising: in response to a control triggering request, traversing, byan intelligent device comprising a memory and a processor incommunication with the memory, pre-stored correspondences betweencontrol triggering requests and terminal devices, to search multipleterminal devices for a target device corresponding to the controltriggering request; determining, by the intelligent device, whether acontrol protocol of the intelligent device is consistent with a controlprotocol of the target device when the intelligent device and the targetdevice are in a connected state; and when it is determined that thecontrol protocol of the intelligent device is consistent with thecontrol protocol of the target device, receiving, by the intelligentdevice, an input instruction and performing, by the intelligent device,operation control on the target device according to the inputinstruction.
 2. The method according to claim 1, further comprising:performing, by the intelligent device, type matching on the targetdevice to obtain a matching result; and presenting, by the intelligentdevice, a corresponding operation control interface according to thematching result.
 3. The method according to claim 2, wherein, when it isdetermined that the control protocol of the intelligent device isconsistent with the control protocol of the target device, the receivingthe input instruction comprises: receiving, by the intelligent device,the input instruction on the corresponding operation control interface.4. The method according to claim 3, wherein the performing type matchingon the target device to obtain the matching result and the presentingthe corresponding operation control interface according to the matchingresult comprise: obtaining, by the intelligent device, a device type ofthe target device; and performing, by the intelligent device, typematching on the target device according to the device type of the targetdevice and preset correspondences between device types and operationcontrol interfaces, to obtain and display the corresponding operationcontrol interface of the target device.
 5. The method according to claim4, wherein the corresponding operation control interface comprises adefault operation control interface if the device type is a device withno operation interface.
 6. The method according to claim 1, wherein: thereceiving the input instruction comprises: collecting, by theintelligent device, the input instruction when the intelligent devicereceives a trigger operation of an input apparatus corresponding to anoperation of the target device; and the performing the operation controlon the target device according to the input instruction comprises:encoding, by the intelligent device, the input instruction according tothe control protocol of the intelligent device, to obtain encoded data,sending, by the intelligent device, the encoded data to a communicationsmodule of the target device, so that the communications module of thetarget device is configured to decode the encoded data according to thecontrol protocol of the target device, to obtain the input instruction,so that the operation of the target device is performed.
 7. The methodaccording to claim 6, wherein, when the communications module of thetarget device is configured to decode the encoded data according to thecontrol protocol of the target device, to obtain the input instruction,so that the operation of the target device is performed, the methodcomprises: searching, by the communications module of the target devicein the control protocol of the target device, a preset action encodingmapping table after receiving the encoded data, to obtain the inputinstruction corresponding to the encoded data, wherein the inputinstruction comprises an input operation and additional information ofthe input operation; converting the input operation comprised in theinput instruction into an input operation on the target device; callinga corresponding system application programming interface (API) functionin combination with the additional information of the input operation,and running the corresponding system API function to perform theoperation of the target device.
 8. The method according to claim 1,wherein the intelligent device and the target device communicate byusing a cable.
 9. The method according to claim 8, wherein theintelligent device and the target device are also connected through awireless network.
 10. The method according to claim 1, wherein theintelligent device and the target device communicate by using a wirelessnetwork.
 11. An intelligent device for controlling a terminal device,comprising: a memory storing instructions; a processor in communicationwith the memory, wherein, when the processor executes the instructions,the processor is configured to cause the intelligent device to:traverse, in response to a control triggering request, pre-storedcorrespondences between control triggering requests and terminaldevices, to search multiple terminal devices for a target devicecorresponding to the control triggering request; determine whether acontrol protocol of the intelligent device is consistent with a controlprotocol of the target device when the intelligent device and the targetdevice are in a connected state; and when it is determined that thecontrol protocol of the intelligent device is consistent with thecontrol protocol of the target device, receive an input instruction, andperform operation control on the target device according to the inputinstruction.
 12. The intelligent device according to claim 11, wherein,when the processor executes the instructions, the processor isconfigured to farther cause the intelligent device to: perform typematching on the target device to obtain a matching result; and present acorresponding operation control interface according to the matchingresult.
 13. The intelligent device according to claim 12, wherein, whenthe processor is configured to cause the intelligent device to performtype matching on the target device to obtain the matching result andpresent the corresponding operation control interface according to thematching result, the processor is configured to cause the intelligentdevice to: obtain a device type of the target device; and perform typematching on the target device according to the device type of the targetdevice and preset correspondences between device types and operationcontrol interfaces, to obtain and display the corresponding operationcontrol interface of the target device.
 14. The intelligent deviceaccording to claim 13, wherein the corresponding operation controlinterface comprises a default operation control interface if the devicetype is a device with no operation interface.
 15. The intelligent deviceaccording to claim 11, wherein: when the processor is configured tocause the intelligent device to receive the input instruction, theprocessor is configured to cause the intelligent device to: collect theinput instruction when receiving a trigger operation of an inputapparatus corresponding to an operation of the target device; and whenthe processor is configured to cause the intelligent device to performthe operation control on the target device according to the inputinstruction, the processor is configured to cause the intelligent deviceto: encode the input instruction according to the control protocol ofthe intelligent device, to obtain encoded data, and send the encodeddata to a communications module of the target device, so that thecommunications module of the target device is configured to decode theencoded data according to the control protocol of the target device, toobtain the input instruction, so that the operation of the target deviceis performed.
 16. The intelligent device according to claim 11, whereinthe intelligent device and the target device communicate by using acable.
 17. The intelligent device according to claim 16, wherein theintelligent device and the target device are also connected through awireless network.
 18. The intelligent device according to claim 11,wherein the intelligent device and the target device communicate byusing a wireless network.
 19. A system for controlling a terminal deviceby using an intelligent device, the system comprising: multiple terminaldevices; and an intelligent device, comprising: a memory storinginstructions; a processor in communication with the memory, wherein,when the processor executes the instructions, the processor isconfigured to cause the intelligent device to: traverse, in response toa control triggering request, pre-stored correspondences between controltriggering requests and terminal devices, to search multiple terminaldevices for a target device corresponding to the control triggeringrequest; determine whether a control protocol of the intelligent deviceis consistent with a control protocol of the target device when theintelligent device and the target device are in a connected state; andwhen it is determined that the control protocol of the intelligentdevice is consistent with the control protocol of the target device,receive an input instruction, and perform operation control on thetarget device according to the input instruction; and wherein the targetdevice is configured to: create a communications module, establish aconnection to the intelligent device by using the communications module,receive the input instruction sent by the intelligent device, andperform the operation control according to the input instruction. 20.The system according to claim 19, wherein: when the processor executesthe instructions, the processor is configured to further cause theintelligent device to: collect the input instruction when theintelligent device receives a trigger operation of an input apparatuscorresponding to an operation of the target device, encode the inputinstruction according to a control protocol of the intelligent device,to obtain encoded data, and send the encoded data to the communicationsmodule of the target device; and the target device is further configuredto: search, in a control protocol of the target device, a preset actionencoding mapping table after receiving the encoded data by using thecommunications module, to obtain the input instruction corresponding tothe encoded data, wherein the input instruction comprises an inputoperation and additional information of the input operation, convert theinput operation comprised in the input instruction into an inputoperation on the target device, and call a corresponding systemapplication programming interface (API) function in combination with theadditional information of the input operation, and run the correspondingsystem API function to perform the operation of the target device.